﻿using System.Collections.Generic;
using LprWrapperSharp;

namespace Kise.LprCapturer
{
    class RecogResultComparer : IEqualityComparer<LprWrapperSharp.RecognizeResult>
    {
        public bool Equals(RecognizeResult x, RecognizeResult y)
        {
            return x.PlateNumber == y.PlateNumber;
        }

        public int GetHashCode(RecognizeResult obj)
        {
            if (!string.IsNullOrEmpty(obj.PlateNumber))
            {
                return obj.PlateNumber.GetHashCode();
            }
            else
            {
                return string.Empty.GetHashCode();
            }
            
        }
    }
}
